package com.dominator.utils.json;

import net.sf.json.JSONObject;
import net.sf.json.xml.XMLSerializer;
 

public class XmlJSON {

    public static String xml2JSON(String xml){
        return new XMLSerializer().read(xml).toString();
    }
     
    public static String json2XML(String json){
        JSONObject jobj = JSONObject.fromObject(json);
        String xml =  new XMLSerializer().write(jobj);
        return xml;
    }
     
    public static void main(String[] args) {

//        String json = xml2JSON(xml);
//        System.out.println("json="+json);
//        String xml = json2XML(json);
//        System.out.println("xml = "+xml);
    }
}